<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title" id="myModalLabel"><?php echo $pageTitle; ?></h4>
</div>
<div class="modal-body">
    <table class="table table-bordered table-hover tablesorter item-list">
        <thead>
            <th class="header bg-info">#</th>
            <th class="header">&nbsp;</th>
            <th class="header">Sản phẩm</th>
            <th class="header">Giá</th>
            <th class="header">Số lượng</th>
            <th class="header">Thành tiền</th>
        </thead>
        <tbody>
            <?php $total = 0; ?>
            <?php foreach($aOrderDetail as $index=>$detail) { ?>
            <tr>
                <th class="bg-info"><?php echo $index+1; ?></th>
                <td class="col-md-1">
                    <div class="media">
                        <a class="thumbnail fancybox" href="<?php echo product_upload($detail->product_image, $image_folder, false); ?>">
                            <img class="media-object" src="<?php echo product_upload($detail->product_image, $image_folder); ?>" />
                        </a>
                    </div>
                </td>
                <td>
                    <h4 class="strong">
                        <a href="<?php echo product_url($detail->product_slug); ?>"><?php echo $detail->product_title; ?></a>
                    </h4>
                    <p class="strong"><?php echo $detail->getProductCode(); ?></p>
                </td>
                <td class="normal-price-style" data-price="<?php echo $detail->getPrice(); ?>"><?php echo currency_format($detail->getPrice()); ?></td>
                <td class="strong"><?php echo $detail->getCount(); ?></td>
                <td class="normal-price-style">
                    <?php
                        $stotal = $detail->getPrice() * $detail->getCount();
                        $total += $stotal;
                        echo currency_format($stotal);
                    ?>
                </td>
            </tr>
            <?php } ?>
        </tbody>
        <tfoot>
            <tr class="active">
                <td colspan="5"><p style="text-align: right;">Tổng cộng : </p></td>
                <td>
                    <h4 class="normal-price-style"><?php echo currency_format($total); ?></h4>
                </td>
            </tr>
        </tfoot>
    </table>
</div>